package itanty.aop3;

import org.springframework.aop.AfterReturningAdvice;

import java.lang.reflect.Method;

/**
 * @date 2025/9/23
 */
public class WelcomeAdvice implements AfterReturningAdvice {
    /**
     * 后置通知
     * @param returnValue 目标方法返回值
     * @param method
     * @param args
     * @param target
     * @throws Throwable
     */
    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println(target + "目标类中的" + method.getName() + "方法执行成功,方法的返回值为:" + returnValue);
    }
}
